package jsyf.oa.entity.doc;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * Created by Maqiuqiu on 2018/4/24.
 */
@Entity
@Table(name = "T_DOC_FILE_TYPE", schema = "oa", catalog = "")
public class FileTypeEntity extends BaseEntity implements Serializable {

    private Integer columnType;
    private String documentName;
    private String companyId;
    private String attachmentName;
    private String attachmentUrl;
    private String pictureName;
    private String pictureUrl;
    private Integer screenType;
    private String departId;
    private String createId;

    public Integer getColumnType() {
        return columnType;
    }

    public void setColumnType(Integer columnType) {
        this.columnType = columnType;
    }

    public String getDocumentName() {
        return documentName;
    }

    public void setDocumentName(String documentName) {
        this.documentName = documentName;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public String getAttachmentName() {
        return attachmentName;
    }

    public void setAttachmentName(String attachmentName) {
        this.attachmentName = attachmentName;
    }

    public String getAttachmentUrl() {
        return attachmentUrl;
    }

    public void setAttachmentUrl(String attachmentUrl) {
        this.attachmentUrl = attachmentUrl;
    }

    public String getPictureName() {
        return pictureName;
    }

    public void setPictureName(String pictureName) {
        this.pictureName = pictureName;
    }

    public String getPictureUrl() {
        return pictureUrl;
    }

    public void setPictureUrl(String pictureUrl) {
        this.pictureUrl = pictureUrl;
    }

    public Integer getScreenType() {
        return screenType;
    }

    public void setScreenType(Integer screenType) {
        this.screenType = screenType;
    }

    public String getDepartId() {
        return departId;
    }

    public void setDepartId(String departId) {
        this.departId = departId;
    }

    public String getCreateId() {
        return createId;
    }

    public void setCreateId(String createId) {
        this.createId = createId;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID",getId());
        obj.put("COLUMN_TYPE",getColumnType());
        obj.put("DOCUMENT_NAME",getDocumentName());
        obj.put("COMPANY_ID",getCompanyId());
        obj.put("ATTACHMENT_NAME",getAttachmentName());
        obj.put("ATTACHMENT_URL",getAttachmentUrl());
        obj.put("PICTURE_NAME",getPictureName());
        obj.put("PICTURE_URL",getPictureUrl());
        obj.put("SCREEN_TYPE",getScreenType());
        obj.put("DEPART_ID",getDepartId());
        obj.put("CREATE_ID",getCreateId());
        obj.put("CREATE_TIME",getCreateTime());
        return  obj;
    }

    @Override
    public String getTableName() {
        return "t_doc_file_type";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID","id");
        obj.put("COLUMN_TYPE","columnType");
        obj.put("DOCUMENT_NAME","documentName");
        obj.put("COMPANY_ID","companyId");
        obj.put("ATTACHMENT_NAME","attachmentName");
        obj.put("ATTACHMENT_URL","attachmentUrl");
        obj.put("PICTURE_NAME","pictureName");
        obj.put("PICTURE_URL","pictureUrl");
        obj.put("SCREEN_TYPE","screenType");
        obj.put("DEPART_ID","departId");
        obj.put("CREATE_ID","createId");
        obj.put("CREATE_TIME","createTime");
        return  obj;
    }
}
